package com.zhangxin.threadcoreknowledge;

/**
 * 两种方法实现线程的示例
 */
public class BothRunnableAndThreadStyle {

    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("我是来自实现Runnable的线程");
            }
        }){
            @Override
            public void run() {
                System.out.println("我是继承Thread的线程");
            }
        }.start();
    }

}
